package com.settlement.system.service;

import com.settlement.system.common.exception.ServiceException;
import com.settlement.system.model.entity.common.TblQueryFieldConfig;
import com.settlement.system.model.entity.common.TblQueryJoinTable;
import lombok.SneakyThrows;

import java.util.List;

/**
 * 联表查询主表 服务类
 * @author xiaochuan
 * @since 2022-01-13
 */

public interface ITblQueryJoinTableService extends IBaseService {

    String getDataBaseTableNameByTableNameCn(String tableNameCn);

    TblQueryFieldConfig getDataBaseColumnNameByModel(TblQueryFieldConfig tblIifConditionConfig);

    @SneakyThrows
    String appendCondition(TblQueryJoinTable model);

    @SneakyThrows
    String appendGroupCondition(TblQueryJoinTable model);

    void sqlMatcher(TblQueryJoinTable model);

    void groupSqlMatcher(TblQueryJoinTable model);

    Integer getCountBySql(String sql) throws Exception;

    List<Object> executeSqlStr(String sql) throws Exception;

    String checkBeforeCopy(List<TblQueryJoinTable> copyList) throws ServiceException;

    ITblRrBillTypeService getTblRrBillTypeService();
}

